package vg.services.plugin_manager.event_and_request.request;

import vg.services.graph_view_manager.interfaces.graph_view.AGraphView;
import vg.services.graph_view_manager.interfaces.tab.ATab;

/**
 * This request asks the decoders to replace current tab by other tab.
 *
 * @author Timur Zolotuhin (e-mail: tzolotuhin@gmail.com)
 */
public class UIRequestReplaceCurrentTab extends AUIRequest {
	private final ATab tab;

	public UIRequestReplaceCurrentTab(final ATab tab, final IUIRequestOwner owner) {
		super(EUIRequestType.DEF_REPLACE_CURRENT_TAB, owner);
		this.tab = tab;
	}

    public UIRequestReplaceCurrentTab(final AGraphView tab) {
        super(EUIRequestType.DEF_REPLACE_CURRENT_TAB, null);
        this.tab = tab;
    }

    public ATab getTab() {
        return tab;
    }
}
